package com.itcam.cammyapiclientsdk;

import com.itcam.cammyapiclientsdk.client.CammyApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Author:Cammy.Wu
 * Date:2024-06-05org.springframework.context.annotation.Configuration
 * Description:
 */

@Configuration
@ConfigurationProperties("cammyapi.client") // 读取application.properties配置
@Data
@ComponentScan
public class CammyApiClientConfig {

    private String accessKey;

    private String secretKey;

    @Bean
    public CammyApiClient cammyClient() {
        return new CammyApiClient(accessKey, secretKey);
    }
}
